<!--
 * @FilePath     : /study_code/css/float5.html
 * @Description  : 浮动元素会躲开被占据位置，在更下方显示
 * @Date         : 2025-04-27 10:18:42
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-27 10:25:50
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
    <style>
      .parent {
        width: 300px;
        border: 1px solid red;
      }

      .box {
        width: 80px;
      }

      .fl {
        float: left;
      }

      .a1 {
        height: 100px;
        background-color: lightseagreen;
      }

      .b1 {
        height: 80px;
        background-color: lightsalmon;
      }

      .c1 {
        height: 120px;
        background-color: red;
      }

      .d1 {
        height: 50px;
        background-color: blue;
      }

      .e1 {
        height: 200px;
        background-color: pink;
      }

      .f1 {
        height: 90px;
        background-color: green;
      }
    </style>
  </head>
  <body>
    <div class="parent">
      <p>
        Lorem ipsum dolor sit amet consectetur, adipisicing elit. Harum aliquid, quis impedit quia
        quod fugiat accusamus eos autem ipsum qui. （不浮动元素）
      </p>
      <div class="fl">浮动元素</div>
      <div class="fl">浮动元素</div>
      <div class="fl">浮动元素</div>
      <div class="fl">浮动元素</div>
      <div class="fl">浮动元素</div>
      <div class="fl">浮动元素</div>
      <p style="color: red">
        <span>内联元素</span>
        这里就是往下排 （且会挤走那一行的文本，且内联文本元素也会不规则被挤压，出现位置的布局情况）
      </p>
      <p>
        Lorem ipsum dolor sit amet consectetur, adipisicing elit. Harum aliquid, quis impedit quia
        quod fugiat accusamus eos autem ipsum qui. （不浮动元素）
      </p>
    </div>

    <hr />

    <div class="parent">
      <div class="box fl a1">a1</div>
      <div class="box fl b1">b1</div>
      <div class="box fl c1">c1</div>
      <div class="box fl d1">d1</div>
      <div class="box fl e1">e1</div>
      <div class="box fl f1">f1</div>
    </div>
    <script></script>
  </body>
</html>
